﻿using Coldairarrow.Entity;
using Coldairarrow.Entity.Goods;
using Coldairarrow.Entity.TurnPDF;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business
{
    public interface IWarehouse_InformationBusiness
    {
        #region 后台
        Task<PageResult<Warehouse_Information>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<Warehouse_Information> GetTheDataAsync(string id);
        Task AddDataAsync(Warehouse_Information data);
        Task UpdateDataAsync(Warehouse_Information data);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 添加入库
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task AddDataTwoAsync(Warehouse_Information data);
        /// <summary>
        /// 获取出入库明细
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<Warehouse_InformationDto>> GetOutData(PageInput<ConditionDTO> input);
        /// <summary>
        /// 获取出入库统计
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<Warehouse_Infor>> GetPutstatisticsData(PageInput<Washouse> input);


        Warehouse_InformationDto GetTheData1(InputDTO input);
        Warehouse_InformationDto GetTheData2(InputDTO input);
        Warehouse_InformationDto GetTheData3(InputDTO input);
        Warehouse_InformationDto GetTheData4(InputDTO input);

        #endregion
    }




    public class Washouse
    {
        public string ProductName { get; set; }

        public string ProductsName { get; set; }
    }

    /// <summary>
    /// 统计参数
    /// </summary>
    public class Warehouse_Infor
    {
        /// <summary>
        /// 入库ID
        /// </summary>
        public string Id { get; set; }
        public string ProductId { get; set; }
        public string ProductName { get; set; }
        public string ProductsId { get; set; }
        public string ProductsName { get; set; }

        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 入库次数
        /// </summary>
        public int PutCount { get; set; }
        /// <summary>
        /// 入库量
        /// </summary>
        public int PutNum { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public BTB_GoodsSpecificationsItem _GoodsSpecificationsItem { get; set; }
        /// <summary>
        /// 商品
        /// </summary>
        public BTB_Goods _Goods { get; set; }
        //public string ProductsName { get; set; }
        //public string ProductsName { get; set; }
        //public string ProductsName { get; set; }
    }

    /// <summary>
    /// 入库明细
    /// </summary>
    public class Warehouse_InformationDto 
    {
        /// <summary>
        /// Id
        /// </summary>
        public String Id { get; set; }
        /// <summary>
        /// CreatorId
        /// </summary>
        public String CreatorId { get; set; }
        /// <summary>
        /// CreateTime
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// Deleted
        /// </summary>
        public Boolean? Deleted { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public String ProductName { get; set; }

        /// <summary>
        /// 产品规格名称
        /// </summary>
        public String ProductsName { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public Decimal? Num { get; set; }
        /// <summary>
        /// 总价格
        /// </summary>
        public Decimal? sumPrice { get; set; }
        /// <summary>
        /// 单价格
        /// </summary>
        public Decimal? Price { get; set; }
      
        /// <summary>
        /// 上期结余
        /// </summary>
        public Decimal? Info_Oldbalance { get; set; }
        /// <summary>
        /// 本期结余
        /// </summary>
        public Decimal? ThisBlance { get; set; }

        

        /// <summary>
        /// 版本信息
        /// </summary>
        public String DATA0 { get; set; }

      

    }


}